package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.domain.ShoppingCart;
import com.itheima.dao.ShoppingCartDao;
import com.itheima.service.ShoppingCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartDao, ShoppingCart> implements ShoppingCartService {

    @Autowired
    private ShoppingCartService shoppingCartService;

    //删除购物车中商品
    /*@Override
    public void removeByDishId(Long dishId) {
        LambdaUpdateWrapper<ShoppingCart> wapper = new LambdaUpdateWrapper<>();
        wapper.eq(ShoppingCart::getDishId,dishId);
        ShoppingCart one = shoppingCartService.getOne(wapper);

        shoppingCartService.remove(dishId);
    }*/
}